//
//  PlayDetailSkinCell.swift
//  TimMusic
//
//  Created by nkl on 2024/10/12.
//

import CollectionViewPagingLayout
import Foundation

class PlayDetailSkinCell: UICollectionViewCell {
    // The card view that we apply transforms on
    var card: UIImageView!

    override init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        setup()
    }

    func setup() {
        // Adjust the card view frame
        // you can use Auto-layout too
        let cardFrame = CGRect(
            x: 80,
            y: 30,
            width: frame.width - 160,
            height: frame.height - 60
        )
        card = UIImageView(frame: cardFrame)
        contentView.addSubview(card)
    }
}

extension PlayDetailSkinCell: ScaleTransformView, TransformableView {
    var scaleOptions: ScaleTransformViewOptions {
        .layout(.linear)
    }
}
